package com.example.leetcode.hash;

import com.example.leetcode.hash.common.HashUtils;

import java.util.Arrays;

class Solution1 {
    public int[] twoSum(int[] nums, int target) {
        return HashUtils.twoSum(nums, target);
    }
}

/**
 * 1. 两数之和
 */
public class leetcode1 {

    public static void main(String[] args) {

//        HashMap<Integer, Integer> map = new HashMap<>();
//
//        System.out.println(map.get(10)); // 返回值是null

//        int[] nums = {2,7,11,15};
//        int target = 9;

//        int[] nums = {3,2,4};
//        int target = 6;

//        int[] nums = {3, 3};
//        int target = 6;

        int[] nums = {9, -1, 3, 4, 5};
        int target = 2;

        Solution1 solution1 = new Solution1();

        System.out.println(Arrays.toString(solution1.twoSum(nums, target)));

    }


}
